package com.fqgj.sentry.policy.engine.domain.enums;

import java.io.Serializable;

/**
 * Created by kennykong on 2017/7/20.
 */
public enum RuleTypeEnum implements Serializable {
    /**
     * 规则种类：自定义规则|前置规则
     */

    CUSTOM, COMMON_RULE;

    public static RuleTypeEnum transformByType(Integer type) {
        for (RuleTypeEnum ruleTypeEnum : RuleTypeEnum.values()) {
            if (ruleTypeEnum.ordinal() + 1 == type) {
                return ruleTypeEnum;
            }
        }
        return null;
    }

}
